import { Service, Inject } from "typedi";
import { ClassService } from "../ClassService";
import { ClassDao } from "../../dao/ClassDao";


@Service()
export class ClassServiceImpl implements ClassService{

    protected static principalData:Array<{id:number,title:string}>;
    protected static additionalData:Array<{id:number,title:string}>;

    @Inject()
    private  ClassDao!: ClassDao;

    public async getAllClassData():Promise<any>{

       ClassServiceImpl.additionalData = await this.ClassDao.getAllAdditionalDao();
       ClassServiceImpl.principalData =  await this.ClassDao.getAllPrincipalDao();
        return {principal:ClassServiceImpl.principalData,additional:ClassServiceImpl.additionalData}
    }


}